<template>
  <div><h2>我是Header组件</h2></div>
</template>

<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  name: "Header",
});
</script>

<script setup lang="ts">
import { onUnmounted, onBeforeUnmount } from "vue";
onUnmounted(() => {
  console.log("已经被卸载");
});
onBeforeUnmount(() => {
  console.log("即将被卸载");
});
</script>

<style  scoped >
</style>